import request from '@/utils/request'

// 查询二手房源列表
export function listhouse(query) {
  return request({
    url: '/second/house/list',
    method: 'get',
    params: query
  })
}

// 查询二手房源详细
export function gethouse(id) {
  return request({
    url: '/second/house/' + id,
    method: 'get'
  })
}

// 新增二手房源
export function addhouse(data) {
  return request({
    url: '/second/house',
    method: 'post',
    data: data
  })
}

// 修改二手房源
export function updatehouse(data) {
  return request({
    url: '/second/house',
    method: 'put',
    data: data
  })
}

// 删除二手房源
export function delhouse(id) {
  return request({
    url: '/second/house/' + id,
    method: 'delete'
  })
}
